extends "res://GameScenes/FunctionPropScene/BaseProp/BaseProp.gd"

func _init() -> void:
	prop_id = "AddOne"

func _ready() -> void:
	prop_name = "+1"
	self_destruction = false
	self_description = "单次出牌牌数+1(回合开始时生效)"
	trigger_timing = 1
	detail_label.text = self_description
	hover_detail_label.text = self_description
	if self.get_parent():
		var parent = self.get_parent()
		if parent.name == "PlayerProps":
			detail_label.visible = false
		else:
			detail_label.visible = true

func propFunction(deck,scoreMapping,selectedCardsDetail):
	var parent = self.get_parent()
	var grandParent = parent.get_parent()
	var timer = grandParent.timer
	grandParent.maxSelected += 1
	showRunDetail()
	timer.start() #启动计时器
	await timer.timeout # 等待
	hideRunDetail()
